package team.seekers.hula.course.structure.section.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import team.seekers.hula.common.annotation.ApiResponseBody;
import team.seekers.hula.auth.service.MindUtils;
import team.seekers.hula.course.structure.section.entity.vo.SectionStudyVO;
import team.seekers.hula.course.structure.section.service.SectionService;

/**
 * date: 2022/5/11 10:50
 *
 * @author GH
 * QQ 1124813753
 */
@Controller
@ApiResponseBody
@RequestMapping("/section")
public class SectionController {

    @Autowired
    private SectionService sectionService;

    @GetMapping("/study")
    public SectionStudyVO study(@RequestParam String id) {
        return sectionService.getStudyInfo(id, MindUtils.getUserId());
    }

}
